<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>ht&#39;s Scheme Interpreter: utility/rationaltype.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">ht&#39;s Scheme Interpreter
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">a simplified scheme interpreter implementation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('rationaltype_8cpp_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">rationaltype.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="rationaltype_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="rationaltype_8hpp.html">&quot;rationaltype.hpp&quot;</a></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor">&quot;utility/bigint.hpp&quot;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor">&lt;</span><span class="preprocessor">stdexcept</span><span class="preprocessor">&gt;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor">&lt;</span><span class="preprocessor">iostream</span><span class="preprocessor">&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor">&lt;</span><span class="preprocessor">string</span><span class="preprocessor">&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div>
<div class="line"><a name="l00007"></a><span class="lineno"><a class="line" href="class_rational_type.html#a56acb42164affebe8d27a333eadfeb94">    7</a></span>&#160;<a class="code" href="class_rational_type.html">RationalType</a>::<a class="code" href="class_rational_type.html#a56acb42164affebe8d27a333eadfeb94">RationalType</a>(): <a class="code" href="class_rational_type.html">RationalType</a><a class="code" href="class_rational_type.html#a2d1c2b4f68c9bddd74c299c470ed44fb">(</a>0<a class="code" href="class_rational_type.html#a2d1c2b4f68c9bddd74c299c470ed44fb">)</a> {}</div>
<div class="line"><a name="l00008"></a><span class="lineno"><a class="line" href="class_rational_type.html#a2d1c2b4f68c9bddd74c299c470ed44fb">    8</a></span>&#160;<a class="code" href="class_rational_type.html">RationalType</a>::<a class="code" href="class_rational_type.html#a2d1c2b4f68c9bddd74c299c470ed44fb">RationalType</a>(<span class="keyword">const</span> <a class="code" href="class_big_int.html">BigInt</a>&amp; num): <a class="code" href="class_rational_type.html">RationalType</a><a class="code" href="class_rational_type.html#a3e2add02a28225b077eb8c5f8bde025c">(</a>num<a class="code" href="class_rational_type.html#a3e2add02a28225b077eb8c5f8bde025c">,</a>1<a class="code" href="class_rational_type.html#a3e2add02a28225b077eb8c5f8bde025c">)</a> {}</div>
<div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="class_rational_type.html#a3e2add02a28225b077eb8c5f8bde025c">    9</a></span>&#160;<a class="code" href="class_rational_type.html">RationalType</a>::<a class="code" href="class_rational_type.html#a3e2add02a28225b077eb8c5f8bde025c">RationalType</a>(<span class="keyword">const</span> <a class="code" href="class_big_int.html">BigInt</a>&amp; up, <span class="keyword">const</span> <a class="code" href="class_big_int.html">BigInt</a>&amp; down):</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;    <a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a>(up), <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a>(down)</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;{</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;    <a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">reduce</a><a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">(</a><a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">)</a>;</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;}</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div>
<div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">   15</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_rational_type.html">RationalType</a>::<a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">reduce</a>()</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;{</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a><a class="code" href="class_big_int.html#a9b728ee8c6214feee03d15885dc3f877">.</a><a class="code" href="class_big_int.html#a9b728ee8c6214feee03d15885dc3f877">isZero</a><a class="code" href="class_big_int.html#a9b728ee8c6214feee03d15885dc3f877">(</a><a class="code" href="class_big_int.html#a9b728ee8c6214feee03d15885dc3f877">)</a>) <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;division by zero&quot;</span>);</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <span class="keywordtype">bool</span> finalSign = !(<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">.</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">nonNeg</a> ^ <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">.</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">nonNeg</a>);</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">.</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">nonNeg</a> = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">.</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">nonNeg</a> = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    <a class="code" href="class_big_int.html">BigInt</a> c = <a class="code" href="bigint_8cpp.html#aa1e6ea48e6ed1d605d5f45ed64053273">gcd</a><a class="code" href="bigint_8cpp.html#aa1e6ea48e6ed1d605d5f45ed64053273">(</a><a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a><a class="code" href="bigint_8cpp.html#aa1e6ea48e6ed1d605d5f45ed64053273">,</a> <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a><a class="code" href="bigint_8cpp.html#aa1e6ea48e6ed1d605d5f45ed64053273">)</a>;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    <a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a><a class="code" href="class_big_int.html#a72d43b327dc95e500d71c667f891cbb8">/=</a>c;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a><a class="code" href="class_big_int.html#a72d43b327dc95e500d71c667f891cbb8">/=</a>c;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">.</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">nonNeg</a> = finalSign;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;}</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="class_rational_type.html#a117224a9c64829b181d814ff0fc7f34f">   27</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_rational_type.html">RationalType</a>::<a class="code" href="class_rational_type.html#a117224a9c64829b181d814ff0fc7f34f">operator</a>==(<span class="keyword">const</span> <a class="code" href="class_rational_type.html">RationalType</a>&amp; b) <span class="keyword">const</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;{</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a> <a class="code" href="class_big_int.html#a057d936831e7a103a1830366c990602f">==</a> b<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">.</a><a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a> &amp;&amp; <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a> <a class="code" href="class_big_int.html#a057d936831e7a103a1830366c990602f">==</a> b<a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">.</a><a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a>;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;}</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="class_rational_type.html#a1dd34debca7b71efec5b70740bd9f4ff">   32</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_rational_type.html">RationalType</a>::<a class="code" href="class_rational_type.html#a1dd34debca7b71efec5b70740bd9f4ff">operator</a>&lt; (<span class="keyword">const</span> <a class="code" href="class_rational_type.html">RationalType</a>&amp; b) <span class="keyword">const</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;{</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">.</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">nonNeg</a> &amp;&amp; !b<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">.</a><a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">.</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">nonNeg</a>)</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;      <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;      <span class="keywordflow">if</span> (!<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">.</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">nonNeg</a> &amp;&amp; b<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">.</a><a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">.</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">nonNeg</a>) <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">.</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">nonNeg</a> &amp;&amp; b<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">.</a><a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">.</a><a class="code" href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">nonNeg</a>)</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;      <span class="keywordflow">return</span> <a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a> <a class="code" href="class_big_int.html#aa4e3204ae4a0c81e8e33d0a848078a8d">*</a> b<a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">.</a><a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a> <a class="code" href="class_big_int.html#a56b4522f02907f0d719809a0e81c525e">&lt;</a> <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a> <a class="code" href="class_big_int.html#aa4e3204ae4a0c81e8e33d0a848078a8d">*</a> b<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">.</a><a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a>;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;      <span class="keywordflow">return</span> <a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a> <a class="code" href="class_big_int.html#aa4e3204ae4a0c81e8e33d0a848078a8d">*</a> b<a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">.</a><a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a> <a class="code" href="class_big_int.html#a4631ce319f6617a43a4dc89127953ebb">&gt;</a> <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a> <a class="code" href="class_big_int.html#aa4e3204ae4a0c81e8e33d0a848078a8d">*</a> b<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">.</a><a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a>;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;}</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="class_rational_type.html#a1a1f4ed1f3830f6c4d161d54f59c6e9c">   44</a></span>&#160;<a class="code" href="class_rational_type.html">RationalType</a>&amp; <a class="code" href="class_rational_type.html">RationalType</a>::<a class="code" href="class_rational_type.html#a1a1f4ed1f3830f6c4d161d54f59c6e9c">operator</a>+= (<span class="keyword">const</span> <a class="code" href="class_rational_type.html">RationalType</a>&amp; b)</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;{</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <a class="code" href="class_big_int.html">BigInt</a> oldDown = <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a>;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a> = <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a> <a class="code" href="class_big_int.html#aa4e3204ae4a0c81e8e33d0a848078a8d">*</a> b<a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">.</a><a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a>;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a> = <a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a> <a class="code" href="class_big_int.html#aa4e3204ae4a0c81e8e33d0a848078a8d">*</a> b<a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">.</a><a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a> <a class="code" href="class_big_int.html#a468c8997e2ec45ef37d5ff32becc5818">+</a> b<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">.</a><a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a> <a class="code" href="class_big_int.html#aa4e3204ae4a0c81e8e33d0a848078a8d">*</a> oldDown;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">reduce</a><a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">(</a><a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">)</a>;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;}</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="class_rational_type.html#a6881a9f8aa0f189c3cff2305f721c414">   53</a></span>&#160;<a class="code" href="class_rational_type.html">RationalType</a>&amp; <a class="code" href="class_rational_type.html">RationalType</a>::<a class="code" href="class_rational_type.html#a6881a9f8aa0f189c3cff2305f721c414">operator</a>-= (<span class="keyword">const</span> <a class="code" href="class_rational_type.html">RationalType</a>&amp; b)</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;{</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <a class="code" href="class_big_int.html">BigInt</a> oldDown = <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a>;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a> = <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a> <a class="code" href="class_big_int.html#aa4e3204ae4a0c81e8e33d0a848078a8d">*</a> b<a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">.</a><a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a>;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a> = <a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a> <a class="code" href="class_big_int.html#aa4e3204ae4a0c81e8e33d0a848078a8d">*</a> b<a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">.</a><a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a> <a class="code" href="class_big_int.html#a64ef59813d4221635ae33f8de10f88cb">-</a> b<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">.</a><a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a> <a class="code" href="class_big_int.html#aa4e3204ae4a0c81e8e33d0a848078a8d">*</a> oldDown;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">reduce</a><a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">(</a><a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">)</a>;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;}</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="class_rational_type.html#a1d5f9a09c2fca52e24d6b167359d6ea5">   62</a></span>&#160;<a class="code" href="class_rational_type.html">RationalType</a>&amp; <a class="code" href="class_rational_type.html">RationalType</a>::<a class="code" href="class_rational_type.html#a1d5f9a09c2fca52e24d6b167359d6ea5">operator</a>*= (<span class="keyword">const</span> <a class="code" href="class_rational_type.html">RationalType</a>&amp; b)</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;{</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a> <a class="code" href="class_big_int.html#aaf4a32e323d4f67fc6c04462ed812461">*=</a> b<a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">.</a><a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a>;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a> <a class="code" href="class_big_int.html#aaf4a32e323d4f67fc6c04462ed812461">*=</a> b<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">.</a><a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a>;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">reduce</a><a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">(</a><a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">)</a>;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;}</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="class_rational_type.html#a3635767c9f938bce5c6310ddc1c44801">   70</a></span>&#160;<a class="code" href="class_rational_type.html">RationalType</a>&amp; <a class="code" href="class_rational_type.html">RationalType</a>::<a class="code" href="class_rational_type.html#a3635767c9f938bce5c6310ddc1c44801">operator</a>/= (<span class="keyword">const</span> <a class="code" href="class_rational_type.html">RationalType</a>&amp; b)</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;{</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordflow">if</span> (b<a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">.</a><a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a><a class="code" href="class_big_int.html#a9b728ee8c6214feee03d15885dc3f877">.</a><a class="code" href="class_big_int.html#a9b728ee8c6214feee03d15885dc3f877">isZero</a><a class="code" href="class_big_int.html#a9b728ee8c6214feee03d15885dc3f877">(</a><a class="code" href="class_big_int.html#a9b728ee8c6214feee03d15885dc3f877">)</a>)</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;      <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;division by zero&quot;</span>);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a> <a class="code" href="class_big_int.html#aaf4a32e323d4f67fc6c04462ed812461">*=</a> b<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">.</a><a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a>;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a> <a class="code" href="class_big_int.html#aaf4a32e323d4f67fc6c04462ed812461">*=</a> b<a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">.</a><a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a>;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">reduce</a><a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">(</a><a class="code" href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">)</a>;</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;}</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="rationaltype_8cpp.html#a03ba623b12ad5e6e6df81ba8fad47981">   80</a></span>&#160;std::istream&amp; <a class="code" href="rationaltype_8cpp.html#a03ba623b12ad5e6e6df81ba8fad47981">operator</a> &gt;&gt;(std::istream&amp; i, <a class="code" href="class_rational_type.html">RationalType</a>&amp; a)</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;{</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    std::string s;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    i&gt;&gt;s;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    size_t pos = s.find(<span class="stringliteral">&#39;/&#39;</span>);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="keywordflow">if</span> (pos==s.npos) a=<a class="code" href="class_rational_type.html">RationalType</a><a class="code" href="class_rational_type.html#a2d1c2b4f68c9bddd74c299c470ed44fb">(</a><a class="code" href="class_big_int.html">BigInt</a><a class="code" href="class_big_int.html#abe13ffcbf871ddb97365a73120ca0b6f">(</a>s));</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;      a=<a class="code" href="class_rational_type.html">RationalType</a><a class="code" href="class_rational_type.html#a3e2add02a28225b077eb8c5f8bde025c">(</a> <a class="code" href="class_big_int.html">BigInt</a><a class="code" href="class_big_int.html#abe13ffcbf871ddb97365a73120ca0b6f">(</a>s.substr(0,pos))<a class="code" href="class_rational_type.html#a3e2add02a28225b077eb8c5f8bde025c">,</a> <a class="code" href="class_big_int.html">BigInt</a><a class="code" href="class_big_int.html#abe13ffcbf871ddb97365a73120ca0b6f">(</a>s.substr(pos+1)) <a class="code" href="class_rational_type.html#a3e2add02a28225b077eb8c5f8bde025c">)</a>;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keywordflow">return</span> i;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;}</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div>
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="rationaltype_8cpp.html#ad1e553a2da4313b37b5bf59bdeb16655">   91</a></span>&#160;std::ostream&amp; operator &lt;&lt;(std::ostream&amp; o, <span class="keyword">const</span> <a class="code" href="class_rational_type.html">RationalType</a>&amp; a)</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;{</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    o&lt;&lt;a<a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">.</a><a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a>;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordflow">if</span> (a<a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">.</a><a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a> <a class="code" href="class_big_int.html#ad6a59ed7dedbe35433c1a83ca751fe88">!=</a> <a class="code" href="class_big_int.html">BigInt</a><a class="code" href="class_big_int.html#a4421e6c1883874512f1b04543dafc64a">(</a>1)) o&lt;&lt;<span class="stringliteral">&#39;/&#39;</span>&lt;&lt;a<a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">.</a><a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a>;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keywordflow">return</span> o;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;}</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="class_rational_type.html#a82ffd1cfc06edee058b86122a99acf99">   98</a></span>&#160;<a class="code" href="class_rational_type.html">RationalType</a>::<a class="code" href="class_rational_type.html#a82ffd1cfc06edee058b86122a99acf99">operator</a> <span class="keywordtype">double</span>()</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;{</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">up_</a><a class="code" href="class_big_int.html#a79b9a7b9d93e3c0a932491d613d618e5">.</a><a class="code" href="class_big_int.html#a79b9a7b9d93e3c0a932491d613d618e5">operator</a> <span class="keywordtype">double</span><a class="code" href="class_big_int.html#a79b9a7b9d93e3c0a932491d613d618e5">(</a><a class="code" href="class_big_int.html#a79b9a7b9d93e3c0a932491d613d618e5">)</a> / <a class="code" href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">down_</a><a class="code" href="class_big_int.html#a79b9a7b9d93e3c0a932491d613d618e5">.</a><a class="code" href="class_big_int.html#a79b9a7b9d93e3c0a932491d613d618e5">operator</a> <span class="keywordtype">double</span><a class="code" href="class_big_int.html#a79b9a7b9d93e3c0a932491d613d618e5">(</a><a class="code" href="class_big_int.html#a79b9a7b9d93e3c0a932491d613d618e5">)</a>;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;}</div>
<div class="ttc" id="class_big_int_html_a72d43b327dc95e500d71c667f891cbb8"><div class="ttname"><a href="class_big_int.html#a72d43b327dc95e500d71c667f891cbb8">BigInt::operator/=</a></div><div class="ttdeci">BigInt &amp; operator/=(const BigInt &amp;b)</div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00353">bigint.cpp:353</a></div></div>
<div class="ttc" id="class_rational_type_html_a1dd34debca7b71efec5b70740bd9f4ff"><div class="ttname"><a href="class_rational_type.html#a1dd34debca7b71efec5b70740bd9f4ff">RationalType::operator&lt;</a></div><div class="ttdeci">bool operator&lt;(const RationalType &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8cpp_source.html#l00032">rationaltype.cpp:32</a></div></div>
<div class="ttc" id="class_rational_type_html_a82ffd1cfc06edee058b86122a99acf99"><div class="ttname"><a href="class_rational_type.html#a82ffd1cfc06edee058b86122a99acf99">RationalType::operator double</a></div><div class="ttdeci">operator double()</div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8cpp_source.html#l00098">rationaltype.cpp:98</a></div></div>
<div class="ttc" id="class_rational_type_html_a1d5f9a09c2fca52e24d6b167359d6ea5"><div class="ttname"><a href="class_rational_type.html#a1d5f9a09c2fca52e24d6b167359d6ea5">RationalType::operator*=</a></div><div class="ttdeci">RationalType &amp; operator*=(const RationalType &amp;b)</div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8cpp_source.html#l00062">rationaltype.cpp:62</a></div></div>
<div class="ttc" id="class_rational_type_html_ab0173d0fb9a0ca208d52cae36adee9bc"><div class="ttname"><a href="class_rational_type.html#ab0173d0fb9a0ca208d52cae36adee9bc">RationalType::reduce</a></div><div class="ttdeci">void reduce()</div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8cpp_source.html#l00015">rationaltype.cpp:15</a></div></div>
<div class="ttc" id="class_big_int_html_abe13ffcbf871ddb97365a73120ca0b6f"><div class="ttname"><a href="class_big_int.html#abe13ffcbf871ddb97365a73120ca0b6f">BigInt::BigInt</a></div><div class="ttdeci">BigInt(const std::string &amp;s)</div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00025">bigint.cpp:25</a></div></div>
<div class="ttc" id="class_big_int_html_aa4e3204ae4a0c81e8e33d0a848078a8d"><div class="ttname"><a href="class_big_int.html#aa4e3204ae4a0c81e8e33d0a848078a8d">BigInt::operator*</a></div><div class="ttdeci">BigInt operator*(const BigInt &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00278">bigint.cpp:278</a></div></div>
<div class="ttc" id="class_rational_type_html_a3e2add02a28225b077eb8c5f8bde025c"><div class="ttname"><a href="class_rational_type.html#a3e2add02a28225b077eb8c5f8bde025c">RationalType::RationalType</a></div><div class="ttdeci">RationalType(const BigInt &amp;up, const BigInt &amp;down)</div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8cpp_source.html#l00009">rationaltype.cpp:9</a></div></div>
<div class="ttc" id="class_big_int_html_a4631ce319f6617a43a4dc89127953ebb"><div class="ttname"><a href="class_big_int.html#a4631ce319f6617a43a4dc89127953ebb">BigInt::operator&gt;</a></div><div class="ttdeci">bool operator&gt;(const BigInt &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00133">bigint.cpp:133</a></div></div>
<div class="ttc" id="class_rational_type_html_a1a1f4ed1f3830f6c4d161d54f59c6e9c"><div class="ttname"><a href="class_rational_type.html#a1a1f4ed1f3830f6c4d161d54f59c6e9c">RationalType::operator+=</a></div><div class="ttdeci">RationalType &amp; operator+=(const RationalType &amp;b)</div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8cpp_source.html#l00044">rationaltype.cpp:44</a></div></div>
<div class="ttc" id="class_rational_type_html_a117224a9c64829b181d814ff0fc7f34f"><div class="ttname"><a href="class_rational_type.html#a117224a9c64829b181d814ff0fc7f34f">RationalType::operator==</a></div><div class="ttdeci">bool operator==(const RationalType &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8cpp_source.html#l00027">rationaltype.cpp:27</a></div></div>
<div class="ttc" id="rationaltype_8cpp_html_a03ba623b12ad5e6e6df81ba8fad47981"><div class="ttname"><a href="rationaltype_8cpp.html#a03ba623b12ad5e6e6df81ba8fad47981">operator&gt;&gt;</a></div><div class="ttdeci">std::istream &amp; operator&gt;&gt;(std::istream &amp;i, RationalType &amp;a)</div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8cpp_source.html#l00080">rationaltype.cpp:80</a></div></div>
<div class="ttc" id="class_big_int_html_a56b4522f02907f0d719809a0e81c525e"><div class="ttname"><a href="class_big_int.html#a56b4522f02907f0d719809a0e81c525e">BigInt::operator&lt;</a></div><div class="ttdeci">bool operator&lt;(const BigInt &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00124">bigint.cpp:124</a></div></div>
<div class="ttc" id="bigint_8cpp_html_aa1e6ea48e6ed1d605d5f45ed64053273"><div class="ttname"><a href="bigint_8cpp.html#aa1e6ea48e6ed1d605d5f45ed64053273">gcd</a></div><div class="ttdeci">BigInt gcd(BigInt a, BigInt b)</div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00376">bigint.cpp:376</a></div></div>
<div class="ttc" id="class_big_int_html"><div class="ttname"><a href="class_big_int.html">BigInt</a></div><div class="ttdef"><b>Definition:</b> <a href="bigint_8hpp_source.html#l00011">bigint.hpp:11</a></div></div>
<div class="ttc" id="class_big_int_html_a4421e6c1883874512f1b04543dafc64a"><div class="ttname"><a href="class_big_int.html#a4421e6c1883874512f1b04543dafc64a">BigInt::BigInt</a></div><div class="ttdeci">BigInt(long long num)</div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00020">bigint.cpp:20</a></div></div>
<div class="ttc" id="class_rational_type_html_a2d1c2b4f68c9bddd74c299c470ed44fb"><div class="ttname"><a href="class_rational_type.html#a2d1c2b4f68c9bddd74c299c470ed44fb">RationalType::RationalType</a></div><div class="ttdeci">RationalType(const BigInt &amp;num)</div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8cpp_source.html#l00008">rationaltype.cpp:8</a></div></div>
<div class="ttc" id="class_big_int_html_aaf4a32e323d4f67fc6c04462ed812461"><div class="ttname"><a href="class_big_int.html#aaf4a32e323d4f67fc6c04462ed812461">BigInt::operator*=</a></div><div class="ttdeci">BigInt &amp; operator*=(const BigInt &amp;b)</div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00303">bigint.cpp:303</a></div></div>
<div class="ttc" id="class_rational_type_html_ab200b64618693ea1a166755f8d8bec63"><div class="ttname"><a href="class_rational_type.html#ab200b64618693ea1a166755f8d8bec63">RationalType::up_</a></div><div class="ttdeci">BigInt up_</div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8hpp_source.html#l00012">rationaltype.hpp:12</a></div></div>
<div class="ttc" id="class_big_int_html_a9b728ee8c6214feee03d15885dc3f877"><div class="ttname"><a href="class_big_int.html#a9b728ee8c6214feee03d15885dc3f877">BigInt::isZero</a></div><div class="ttdeci">bool isZero() const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00015">bigint.cpp:15</a></div></div>
<div class="ttc" id="class_big_int_html_ad6a59ed7dedbe35433c1a83ca751fe88"><div class="ttname"><a href="class_big_int.html#ad6a59ed7dedbe35433c1a83ca751fe88">BigInt::operator!=</a></div><div class="ttdeci">bool operator!=(const BigInt &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00146">bigint.cpp:146</a></div></div>
<div class="ttc" id="class_rational_type_html_a6881a9f8aa0f189c3cff2305f721c414"><div class="ttname"><a href="class_rational_type.html#a6881a9f8aa0f189c3cff2305f721c414">RationalType::operator-=</a></div><div class="ttdeci">RationalType &amp; operator-=(const RationalType &amp;b)</div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8cpp_source.html#l00053">rationaltype.cpp:53</a></div></div>
<div class="ttc" id="class_big_int_html_a468c8997e2ec45ef37d5ff32becc5818"><div class="ttname"><a href="class_big_int.html#a468c8997e2ec45ef37d5ff32becc5818">BigInt::operator+</a></div><div class="ttdeci">BigInt operator+(const BigInt &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00264">bigint.cpp:264</a></div></div>
<div class="ttc" id="class_big_int_html_a79b9a7b9d93e3c0a932491d613d618e5"><div class="ttname"><a href="class_big_int.html#a79b9a7b9d93e3c0a932491d613d618e5">BigInt::operator double</a></div><div class="ttdeci">operator double()</div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00388">bigint.cpp:388</a></div></div>
<div class="ttc" id="class_big_int_html_a057d936831e7a103a1830366c990602f"><div class="ttname"><a href="class_big_int.html#a057d936831e7a103a1830366c990602f">BigInt::operator==</a></div><div class="ttdeci">bool operator==(const BigInt &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00138">bigint.cpp:138</a></div></div>
<div class="ttc" id="class_rational_type_html_a3635767c9f938bce5c6310ddc1c44801"><div class="ttname"><a href="class_rational_type.html#a3635767c9f938bce5c6310ddc1c44801">RationalType::operator/=</a></div><div class="ttdeci">RationalType &amp; operator/=(const RationalType &amp;b)</div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8cpp_source.html#l00070">rationaltype.cpp:70</a></div></div>
<div class="ttc" id="class_rational_type_html_a56acb42164affebe8d27a333eadfeb94"><div class="ttname"><a href="class_rational_type.html#a56acb42164affebe8d27a333eadfeb94">RationalType::RationalType</a></div><div class="ttdeci">RationalType()</div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8cpp_source.html#l00007">rationaltype.cpp:7</a></div></div>
<div class="ttc" id="class_rational_type_html_ac8ef6030f321ab6402d6469f860e7a05"><div class="ttname"><a href="class_rational_type.html#ac8ef6030f321ab6402d6469f860e7a05">RationalType::down_</a></div><div class="ttdeci">BigInt down_</div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8hpp_source.html#l00012">rationaltype.hpp:12</a></div></div>
<div class="ttc" id="class_rational_type_html"><div class="ttname"><a href="class_rational_type.html">RationalType</a></div><div class="ttdef"><b>Definition:</b> <a href="rationaltype_8hpp_source.html#l00007">rationaltype.hpp:7</a></div></div>
<div class="ttc" id="class_big_int_html_a64ef59813d4221635ae33f8de10f88cb"><div class="ttname"><a href="class_big_int.html#a64ef59813d4221635ae33f8de10f88cb">BigInt::operator-</a></div><div class="ttdeci">BigInt operator-(const BigInt &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00271">bigint.cpp:271</a></div></div>
<div class="ttc" id="class_big_int_html_afc36eaf290d1b537127ba9f651b5db86"><div class="ttname"><a href="class_big_int.html#afc36eaf290d1b537127ba9f651b5db86">BigInt::nonNeg</a></div><div class="ttdeci">bool nonNeg</div><div class="ttdef"><b>Definition:</b> <a href="bigint_8hpp_source.html#l00016">bigint.hpp:16</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_64e73385a8b7738563c26ce10415b58d.html">utility</a></li><li class="navelem"><a class="el" href="rationaltype_8cpp.html">rationaltype.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
